<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>商品添加</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="css/vendor/vendor.min.css">
    <link rel="stylesheet" href="css/plugins/plugins.min.css">
    <!-- Style CSS -->
    <!-- <link rel="stylesheet" href="css/style.css"> -->
    <link rel="stylesheet" href="css/style.min.css">
    <script src="js/vendor.min.js"></script>
    <script src="js/plugins.min.js"></script>
    <!--Main JS (Common Activation Codes)-->
    <!-- <script src="js/main.js"></script> -->
    <script src="js/main.min.js"></script>
    <script src="js/jquery-3.4.1.js"></script>
    <script src="js/upload.js"></script>
</head>
<body>
<div th:insert="~{top :: t}"></div>

<div class="panel panel-default">
    <div class="panel-body">
        <h2>添加商品/<a href="dispatcher?url=index.html">回首页</a></h2>
    </div>
    <!-- 底部脚注 -->
    <div class="panel-footer">
        <div style="padding: 10px 100px 10px;">
            <h3>商品预览</h3>
            <br/>
            <img th:src="${filePath}" class="img-thumbnail" id="img">
            <br>
            <form action="upload.do" method="post" enctype="multipart/form-data" name="fileUpload">
                <div class="form-group">
                    <label for="inputfile">请上传相关效果图</label>
                    <input type="file" id="inputfile" name="file">
                </div>
                <br>
                <label id="display" style="cursor: pointer;color: red" >点击查看效果</label>
            </form>
            <br>
            <form class="bs-example bs-example-form" role="form" action="addGood.do" method="post">
                <br/>
                <input type="hidden" name="shopName" th:value="${id}"/>
                <input type="hidden" name="fileName" th:value="${fileName}"/>
                <div class="input-group">
                    <span class="input-group-addon" style="width: 80px">商品名称</span>
                    <input type="text" class="form-control" placeholder="商品名称" name="goodsName">
                </div>
                <br>
                <div class="form-group">
                    <label>请选择商品类型</label>
                    <select class="form-control" name="goodsType">
                        <option>请选择...</option>
                        <option value="1">水果</option>
                        <option value="2">蔬菜</option>
                        <option value="3">生鲜</option>
                        <option value="4">烘培</option>
                        <option value="5">肉类</option>
                        <option value="6">高粱</option>
                    </select>
                </div>
                <br/>
                <div class="input-group">
                    <span class="input-group-addon" style="width: 120px">完善商品描述:</span>
                    <input type="text" class="form-control" placeholder="完善商品描述" name="goodsDetails">
                </div>
                <br/>
                <div class="input-group">
                    <span class="input-group-addon" style="width: 120px">请输入库存余量:</span>
                    <input type="text" class="form-control" placeholder="请输入库存余量" name="stock">
                    <span class="input-group-addon" style="width: 50px;">KG</span>
                </div>
                <br>
                <div class="input-group">
                    <span class="input-group-addon" style="width: 150px">请输入商品价格(￥):</span>
                    <input type="text" class="form-control" name="price">
                    <span class="input-group-addon" style="width: 50px;">元</span>
                </div>
                <br/>
                <br>
                <div class="input-group">
                    <span class="input-group-addon" style="width: 150px">商品备注:</span>
                    <input type="text" class="form-control" name="remarks" placeholder="备注">
                </div>
                <br/>
                <p>
                    <button type="submit" class="btn btn-primary btn-lg btn-block">提交</button>
                </p>
            </form>
        </div>
    </div>
</div>
<div th:include="~{footer :: foot}"></div>
</body>
</html>